<script setup lang="ts">
import { onMounted } from 'vue'
import { useUserStore } from '@/store/user'

const userStore = useUserStore()

onMounted(() => {
  if (localStorage.getItem('token')) {
    userStore.getUserInfoAction()
    userStore.fetchMenuList()
  }
})
</script>

<template>
  <router-view />
</template>

<style>
#app {
  height: 100%;
  width: 100%;
}
</style>
